import request from '@/utils/request'

export const getList = (params) => {
  return request({
    url: '/steel-arch/client/role/list',
    params:params,
    method: 'get'
  })
}
export const addRole = (params) => {
  return request({
    url: '/steel-arch/client/role/add',
    data:params,
    method: 'post'
  })
}
export const editRole = (params) => {
  return request({
    url: '/steel-arch/client/role/update',
    data:params,
    method: 'post'
  })
}
export const delRole = (id) => {
  return request({
    url: '/steel-arch/client/role/del/'+id,
    method: 'post'
  })
}
export const getMenu = () => {
  return request({
    url: '/steel-arch/system/menu/list',
    method: 'get'
  })
}
export const editMenu = (params) => {
  return request({
    url: '/steel-arch/client/role/updateRoleMenu',
    data:params,
    method: 'post'
  })
}

// 查询角色菜单
export const getRoleMenu = (params) => { 
  return request({
    url: `/steel-arch/client/role/getRoleMenu`,
    params
  })
}